package nowcoder;
/**
 * -查找输入整数二进制中1的个数
 * 链接：https://www.nowcoder.com/practice/1b46eb4cf3fa49b9965ac3c2c1caf5ad?tpId=37&&tqId=21285&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking
 */
import java.util.*;
public class Day15_1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        while (input.hasNext()){
            int n = input.nextInt();
            int count = 0;
            while(n > 0){
                if(n % 2 == 1){
                    count ++;
                }
                n /= 2;
            }
            System.out.println(count);
        }
    }
}
